package com.rd.student.jiaji.class4.suyan.zrrd.day18.exercise0728;

public class TestName {
    public static void main(String[] args) {
NumberName(4);
    }
    public static void NumberName(int n){
        String arr =new String("石睿, 杜雨坤, 黄奕鸣, 金洪宇, 李鑫, 王宇芳, 苏岩") ;
        String[] split=arr.split(",");//分割字符串
//        Random random=new Random();
        System.out.println(arr);
//        Scanner scanner=new Scanner(System.in);
//        System.out.println("请输入要几个同学");
//        int b=scanner.nextInt();
        String[] str=new String[n];
        for (int i=0;i<n;i++){
            str[i]=split[i];
            System.out.println(str[i]);
        }
    }
}
